% PublicationCounts.m  
%
% Publication counts from SCOPUS, Web of Science, and Google Scholar
% SCOPUS: https://www.scopus.com/search/form.uri?display=advanced     PUBYEAR  =  1980 
% Web of Science: https://apps.webofknowledge.com/WOS_GeneralSearch_input.do?product=WOS&search_mode=GeneralSearch
% Google Scholar: https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&as_ylo=2020&as_yhi=2020
%
%   Data collected June 30, 2021

clear all; close all;
diarychad('PublicationCounts');


data=[
    %Decade	SCOPUS	WebScience	GoogleScholar
   % 1960	181536	151862	936000
    1970	396935	405865	1010000
    1980	656913	749494	1070000
    1990	924494	1007341	1720000
    2000	1310205	1348857	2990000
    2010	2471141	2355456	4430000
    2020	3541823	3408051	5150000
]

yrs=data(:,1);
pubcounts=data(:,2:4);
scop=data(:,2);
wos =data(:,3);
gs  =data(:,4);

% Average annual growth rates
growth=growthrate4(pubcounts,yrs,[1970 2020])';
disp ' '; disp ' ';
disp 'Average annual growth rate of publications'
names={'Scopus','Web of Science','Google Scholar'};
cshow(names,growth*100,'%14.2f','1970-2020')

% Factor increase
factorincrease=pubcounts(end,:)./pubcounts(1,:);
disp ' '; disp ' ';
disp 'Factor increase in publications:'
cshow(names,factorincrease','%14.2f','1970-2020')

definecolors;

figure(1); figsetup; makefigwide;
plot(yrs,log(scop/10^6),'Color',myblue,'LineWidth',LW);
plot(yrs,log(wos/10^6),'Color',myred,'LineWidth',LW);
plot(yrs,log(gs/10^6),'Color',mygreen,'LineWidth',LW);
chadfig2(' ','Millions',1,0)
nums=[.25 .5 1 2 4]';
relabelaxis(log(nums),num2str(nums),'y');
relabelaxis(yrs,num2str(yrs),'x');
ax=axis; ax(4)=log(5.5); axis(ax);
str=sprintf('Scopus\\\\   CAGR=%3.1f%%',growth(1)*100); text(1987,log(0.6),mlstring(str));
str=sprintf('Web of Science\\\\   CAGR=%3.1f%%',growth(2)*100); text(2010,log(1.85),mlstring(str));
str=sprintf('Google Scholar\\\\   CAGR=%3.1f%%',growth(3)*100); text(1985,log(3),mlstring(str));
%text(1987,log(0.7),'Scopus');
%text(2011,log(1.85),mlstring('Web of\\ Science'));
print('-depsc','PublicationCounts');



diary off